<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Tabela de Alunos</title>
    </h:head>
    <h:body>
        <h1>Exemplo Tabela Aluno</h1>

        <h:form>
            <div>
                <table>
                    <tr>
                        <td>Nome:</td>
                        <td><h:inputText value="#{listaAluno.a.nome}" /></td>
                    </tr>
                    <tr >
                        <td >Sobrenome:</td>
                        <td ><h:inputText value="#{listaAluno.a.sobrenome}" /></td>
                    </tr>
                    <tr >
                        <td>Nota:</td>
                        <td><h:inputText value="#{listaAluno.a.nota}" /></td>
                    </tr>
                </table>
            </div>
        <div><h:commandButton action="#{listaAluno.adicionar}" value="Incluir" /> </div>
            <div>&emsp;</div>
        </h:form>
        <h:dataTable var="a" value="#{listaAluno.aluno}">
            <h:column>
                <f:facet name="header">
                    Nome
                </f:facet>
                #{a.nome}
            </h:column>
            <h:column>
                <f:facet name="header">
                    Sobrenome
                </f:facet>
                #{a.sobrenome}
            </h:column>
            <h:column>
                <f:facet name="header">
                    Nota
                </f:facet>
                #{a.nota}
            </h:column>

            <h:form>
                <h:column>
                    <h:commandLink action="#{listaAluno.AumentaNota}">
                        <h:graphicImage value="./img/seta_cima.PNG"></h:graphicImage>
                    </h:commandLink>
                </h:column>
            </h:form>
   
        </h:dataTable>
    </h:body>
</html>

